package com.young.springdemo.service.builderFactoryTest;

import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

//@Component
public class ComputerTest {


//    @PostConstruct
    public void test() throws  Exception{
        Class<?> aClass = Class.forName("com.young.springdemo.service.builderFactoryTest.ServerComputerBuilder");
        ComputerBuilder computerBuilder =  (ComputerBuilder)aClass.newInstance();
        Computer construct = computerBuilder.construct();
        System.out.println(construct.toString());
    }
}
